Method and apparatus for block based image compression with multiple non-uniform block encodings

ABSTRACT

Embodiments of the present invention are directed to a method and apparatus for block based image compression with multiple non-uniform block encodings. In one embodiment, an image is divided into blocks of pixels. In one embodiment the blocks are four pixels by four pixels, but other block sizes are used in other embodiments. In one embodiment, a block of pixels in the original image is compressed using two different methods to produce a first and second compressed block. Thus, each block in the original image is represented by two, typically different, compressed blocks. In one embodiment, color associated with a pixel is determined by combining the compressed information about the pixel in the first compressed block with information about the pixel in the second compressed block. In another embodiment, global information about the image is combined with the information in the first and second compressed blocks.

RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.12/485,537, filed Jun. 16, 2009, entitled “METHOD AND APPARATUS FORBLOCK BASED IMAGE COMPRESSION WITH MULTIPLE NON-UNIFORM BLOCKENCODINGS”, having as inventors Konstantine Iourcha et al., owned byinstant assignee and is incorporated herein by reference, which is acontinuation of U.S. application Ser. No. 10/778,902 (now U.S. Pat. No.7,643,679), filed Feb. 13, 2004, entitled “METHOD AND APPARATUS FORBLOCK BASED IMAGE COMPRESSION WITH MULTIPLE NON-UNIFORM BLOCKENCODINGS”, having as inventors Konstantine lourcha et al., owned byinstant assignee and is incorporated herein by reference, which claimspriority to U.S. Provisional Patent Application No. 60/447,862, filedFeb. 13, 2003, entitled “METHOD AND APPARATUS FOR BLOCK BASED IMAGECOMPRESSION WITH MULTIPLE NON-UNIFORM BLOCK ENCODINGS”, having asinventors Konstantine lourcha et al., owned by instant assignee and isincorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates to the field of image compression, and inparticular to a method and apparatus for block based image compressionwith multiple non-uniform block encodings.

BACKGROUND ART

Typically, there is a desire to compress images used for texturingoperations in 3D graphics accelerator hardware to improve theperformance of rendering and reduce the memory required to store theinformation. However, prior art image compression methods frequentlyproduce undesired visual artifacts when rendering images, making theirapplication appropriate for a limited number of images. This problem canbe better understood with a review of image compression.

Image Compression

Prior art compression techniques can be categorized in at least twoways. First, a technique can be either loss-less or lossy. Second, atechnique can be either fixed or variable rate. A loss-less compressiontechnique is one in which no information about the image is lost due tothe compression. Thus, an image could be compressed and decompressed andthe decompressed image would be identical to the original image. A lossycompression technique is one in which some information about the imageis lost due to the compression. Thus, compression of an image followedby decompression could result in a decompressed image that is notidentical to the original image.

A fixed rate compression technique reduces the storage requirement of animage by a fixed percentage. Since most image formats do not containunnecessary data, almost all fixed rate compression techniques are lossyin general (however, they may not be lossy for a particular image). Avariable rate compression technique reduces the storage requirement ofan image by an amount that is not known at the time when the image iscompressed. In fact, the storage requirement may not be reduced at all.

Because loss-less, variable rate compression techniques are unable toguarantee any rate of compression, graphics systems typically use lossy,fixed rate compression techniques. However, the lossy nature sometimesresults in unacceptable image quality (i.e., visual artifacts).Sometimes, it is so difficult to determine when compression will resultin unacceptable loss of image quality and when it will not that usersand/or systems elect to forgo compression altogether. As systems aredeveloped that utilize larger amounts of information about the system,the desire for compression increases, but the problem of unacceptableimage quality loss also increases in prior art compression systems.

SUMMARY OF THE INVENTION

Embodiments of the present invention are directed to a method andapparatus for block based image compression with multiple non-uniformblock encodings. In one embodiment of the present invention, an image isdivided into blocks of pixels. In one embodiment the blocks are fourpixels by four pixels, but other block sizes are used in otherembodiments.

In one embodiment, a block of pixels in the original image is decomposedinto one or more decomposed blocks, each of which represent a partialdata value of the original block. Each of these blocks are compressedusing the same or different methods for each block to produce one ormore compressed blocks, which are combined to produce an output block.Thus, each block in the original image is represented by a plurality,typically different, compressed blocks each representing all the datavalues of the block. In one embodiment, color (or a similar value)associated with a pixel is determined by combining the compressedinformation about the pixel in one compressed block with compressedinformation about the same pixel in another compressed block. In anotherembodiment, global information about the image is also combined with theinformation in one or more compressed blocks to produce a desired valuefor a pixel.

According to one embodiment, decomposition of the original image isoptimized to reduce the loss. According to one embodiment, theoptimization is performed by conducting a series of functions on a firstsubset comprising of one or more decomposed blocks and applying theresults to a second subset comprising of one or more decomposed blocksdifferent from the ones in the first subset. According to oneembodiment, these functions are iterated through the subsets until apredetermined value of the image is obtained, or some other factor issatisfied. According to another embodiment, the optimization isperformed by projecting an original block to a predefined vector andstoring the original block's magnitude in a first block, and using adevice that projects and subtracts the projection block from of theoriginal block and stores the value in a second block. According toanother embodiment, the optimization is performed by conducting a seriesof functions on the first and second blocks obtained in the previousembodiment. According to another embodiment, the optimization of theprevious embodiment is iterated in a loop until a desired output imageis accomplished or some other factor is met.

As way of example, two decomposed blocks of an original box of pixels inthe image are compressed using two different methods to produce a firstand a second compressed block by encoding each pixel value as an indexinto a color map before combining the two compressed blocks to generatean output block. In one embodiment, the color map maps pixels to a bestfit curve with two end points in a color space. In one embodiment thecurve is a straight line. In one embodiment, the end points of the bestfit curve are values to which the mapping can map. In anotherembodiment, the mapping can map to an extrapolated value between twoendpoints along the best fit curve. In still another embodiment, themapping can map to a plurality of different extrapolated values betweentwo endpoints along the best fit curve. In one embodiment, thecompressed block is comprised of the two endpoints of the best fit curveand index values for each of the pixels.

In an example embodiment, the original block is a four pixel by fourpixel block wherein each pixel value is represented by 24 bits (e.g., a24-bit RGB color value). Two, 16-bit endpoints for a best fit curve arestored. Additionally, sixteen 2-bit indices (one for each pixel in theblock) are stored. The indices encode which of the two endpoint colorsor two interpolated values along the curve are the compressed color foreach pixel. The endpoints and the indices comprise a first compressedblock.

In another example embodiment, a compressed block is created by applyinga function to each of the values of the original block to obtain newblock values. In one embodiment, the function combines components ofeach value to reduce the amount of space needed to encode the data. Inan example embodiment, 24-bit RGB values are combined to create an 8-bitgrey scale value (e.g., (R+G+B)/3). In one embodiment, the new blockvalues are compressed by encoding the block as an index for mapping ontoa best fit curve. In one embodiment, two endpoints are stored. Inanother embodiment, the indices map to either the two end points or anyof one or more interpolated values along the best fit curve. The twostored endpoints and the block of indices comprise a second compressedblock.

In an example embodiment, the original block is a four pixel by fourpixel block wherein each pixel value is represented by 24 bits (e.g., a24-bit RGB color value). The values in the block are converted to 8-bitgrey scale values. Two, 8-bit endpoints for a best fit curve are stored.Additionally, sixteen 3-bit indices (one for each pixel in the block)are stored. The indices encode which of the two endpoint colors or sixinterpolated values along the curve are the compressed color for eachpixel. The endpoints and the indices comprise a third compressed block.Further compressed blocks can be similarly obtained.

In one embodiment, the error generated by compression is computed and ifthe error is greater than a threshold value, one or more values in theplurality of compressed blocks are altered to reduce the computed error.In one embodiment, the color values are encoded as YCrCb. In oneembodiment, the Y component is encoded in one compressed block and CrCbendpoints are used to encode another compressed block. In anotherembodiment, the color values are encoded as RGB values. One of the RGBcomponents are encoded in one compressed block and endpoints in theother two components' color spaces are used to encode another compressedblock.

In one embodiment, the function associated with the creation of one ormore compressed blocks is not a grey scale function. Instead, a vectorthat represents the axis of the function is stored in the compressedblocks. In one embodiment, the vector is of unit length. In anotherembodiment, the vector is of non-unit length. In one embodiment, thevector is a 16-bit axis vector stored in addition to the endpoints andindices as part of the one or more compressed blocks. In anotherembodiment, two 8-bit Theta-Phi axis components are stored in additionto the endpoints and indices as part of the one or more compressedblocks. The Theta-Phi axis components represent angle and elevation ofthe axis vector on a hemisphere. In one embodiment, the number of bitsper index is reduced to allow storage of the vector value withoutincreasing the size of a compressed block beyond a desired maximum size.In various other embodiments, more than one compressed blocks areencoded to represent each original block. Specific bit values have beenfor the purpose of example. One of ordinary skill in the art willrecognize that embodiments of the present invention may be practicedwith original pixel values of any size, using any color encoding scheme,and generating one or more compressed blocks.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other features, aspects and advantages of the presentinvention will become better understood with regard to the followingdescription, appended claims and accompanying drawings where:

FIG. 1 is a flow diagram of the process of compressing an image inaccordance with one embodiment of the present invention.

FIG. 2 is a flow diagram of the process of determining a color for apixel in accordance with one embodiment of the present invention.

FIG. 3 is a flow diagram of the process of compressing a pixel block inaccordance with one embodiment of the present invention.

FIG. 4 is a flow diagram of the process of compressing a 24-bit perpixel, four pixel by four pixel block in accordance with one embodimentof the present invention.

FIG. 5 is a flow diagram of the process of compressing a pixel block inaccordance with one embodiment of the present invention.

FIG. 6 is a flow diagram of the process of compressing a 24-bit perpixel, four pixel by four pixel block in accordance with one embodimentof the present invention.

FIG. 7 is a flow diagram of the process of reducing the occurrence ofvisual artifacts in accordance with one embodiment of the presentinvention.

FIG. 8 is a block diagram of a general purpose computer.

FIG. 9 is an optimization method according to one embodiment of thepresent invention.

FIG. 10 is another optimization method according to one embodiment ofthe present invention.

FIG. 11 is another optimization method according to one embodiment ofthe present invention.

FIG. 12 is another optimization method according to one embodiment ofthe present invention.

FIG. 13 is another optimization method according to one embodiment ofthe present invention.

DETAILED DESCRIPTION OF THE INVENTION

The invention is a method and apparatus for block based imagecompression with multiple non-uniform block encodings. In the followingdescription, numerous specific details are set forth to provide a morethorough description of embodiments of the invention. It is apparent,however, to one skilled in the art, that the invention may be practicedwithout these specific details. In other instances, well known featureshave not been described in detail so as not to obscure the invention.

Multiple Blocks

Embodiments of the present invention are directed to a method andapparatus for block based image compression with multiple non-uniformblock encodings. In one embodiment of the present invention, an image isdivided into blocks of pixels. In one embodiment the blocks are fourpixels by four pixels, but other block sizes are used in otherembodiments.

In one embodiment, a block of pixels in the original image is decomposedinto one or more decomposed blocks, each of which represent a partialdata value of the original block. According to one embodiment, thedecomposition is based on applying a predefined transform function toeach block of pixels. According to another embodiment, the decompositionis optimized to reduce the loss of image quality. Each of thesedecomposed blocks are then compressed using the same or differentmethods for each block to produce one or more compressed blocks, whichare combined to produce an output block. Thus, each block in theoriginal image is represented by a plurality, typically different,compressed blocks each representing all the data values of the block. Inone embodiment, color (or a similar value) associated with a pixel isdetermined by combining the compressed information about the pixel inone compressed block with compressed information about the same pixel inanother compressed block. In another embodiment, global informationabout the image is also combined with the information in one or morecompressed blocks to produce a desired value for a pixel.

FIG. 1 illustrates the process of compressing an image in accordancewith one embodiment of the present invention. At block 100, an image isdivided into a plurality of blocks. At block 110, each block isdecomposed into a plurality of decomposed blocks. At step 120, each ofthese decomposed blocks is compressed to form a plurality of compressedblocks. At step 130, the plurality of compressed blocks are combined togenerate an output block.

Optimization of Decomposed Image Block

According to one embodiment, the decomposition of each original block ofthe image is optimized so that the loss in image quality is reduced to adesired amount, or meets some threshold. According to another embodimentof the present invention, there are several levels of optimizationavailable depending on the threshold or other factors such as timeconstraints, quality of output image, etc. It should be noted here, thatthe optimization methods mentioned below take into account only alimited amount of blocks (2 in these cases), but an unlimited amount ofblocks can be used without departing from the scope of the presentinvention.

A first optimization method for decomposition uses a first subsetcomprising of one or more decomposed blocks and a second subsetcomprising of one or more decomposed blocks different from the ones inthe first subset. This optimization method is illustrated in FIG. 9. Atblock 900, the first subset is compressed. Compression schemes areexplained in more detail below. Next, at block 910, the compressed firstsubset is decompressed. Next, at block 920, the results of thedecompression are fed to a decomposer device that changes the data valueof the second subset. Next, at bock 930, the second subset iscompressed. Blocks 900 through 930 are repeated for every subset of animage until the entire image is compressed.

A second optimization method uses the first optimization method inaddition to a final iteration step. This optimization method isillustrated in FIG. 10. Blocks 900 through 930 remain the same and arenumbered 1000 through 1030. Next, at block 1060, if the optimization hasmet a certain threshold or some other factor, then we stop, else atblock 1040 the compressed second subset is decompressed. Next, at block1050, the results of the decompression are fed to a decomposer devicethat changes the data value of the first subset, and blocks 1000, 1010,1020, 1030, and 1060 are repeated again.

A third optimization method uses an original image block in conjunctionwith a series of functions to generate two new blocks. This optimizationmethod is illustrated in FIG. 11. At block 1100, an original image blockis projected onto a predefined vector, and at block 1110 its magnitudeis stored in a first new block by a decomposer device. Concurrently, atblock 1120, the projected image is subtracted from the original imageand the result is stored in a second new block.

A fourth optimization method uses an original image block in conjunctionwith a series of functions to generate two new blocks. This optimizationmethod is illustrated in FIG. 12. At block 1200, an original image blockis projected onto a predefined vector, and at 1210 its magnitude isstored in a first new block by a decomposer device. Next, at block 1220,the first new block is compressed using any of the compression schemesdescribed below to generate a compressed first block. Next, at block1230, the compressed first block is decompressed. Next, at block 1240,the data value of the decompressed block is subtracted from the datavalue of the original block to generate a new second block. Next, atblock 1250, new second block is compressed to generate a compressedsecond block. Next, at block 1260, compressed first block and compressedsecond block are combined to generate an output block at block 1270.

A fifth optimization method uses an original image block in conjunctionwith a series of functions to generate two new blocks. This optimizationmethod is illustrated in FIG. 13. At block 1300, an original image blockis projected onto a predefined vector, and at 1310 its magnitude isstored in a first new block by a decomposer device. Next, at block 1320,the first new block is compressed using any of the compression schemesdescribed below to generate a compressed first block. Next, at block1330, the compressed first block is decompressed. Next, at block 1340,the data value of the decompressed block is subtracted from the datavalue of the original block to generate a new second block. Next, atblock 1350, new second block is compressed to generate a compressedsecond block. Next, at block 1360, compressed second block isdecompressed and its data value subtracted from the data value of theoriginal block and the results are stored in a third new block. Next, atblock 1370, the data value of the third new block is subtracted from thedata value of the original block and the result is stored back in thefirst new block. At block 1380, if the desired threshold is met, thenthe compressed first block is combined with the compressed second blockto generate an output block at block 1390, else blocks 1310-1370 arerepeated again.

One Compression Method

FIG. 2 illustrates the process of determining a color for a pixel inaccordance with one embodiment of the present invention. At block 200, afirst value associated with a pixel is decoded from a first compressedblock. At block 210, a second value associated with the same pixel isdecoded from a second compressed block. At block 220, the first andsecond values are combined to generate an output pixel. In oneembodiment, the values are combined by averaging. In another embodiment,the values are combined by appending one to the end of another. In otherembodiments, other combining functions are used. It should be noted herethat there can be more than two compressed blocks each containing adifferent value associated with the same pixel, but the general idea ofcombining the values of each compressed block to generate an outputpixel remains the same as explained above.

Another Compression Method

In one embodiment, a first compressed block is created by encoding eachpixel value as an index into a color map. In one embodiment, the colormap maps pixels to a best fit curve with two end points in a colorspace. In one embodiment the curve is a straight line. In oneembodiment, the end points of the best fit curve are values to which themapping can map. In another embodiment, the mapping can map to anextrapolated value between two endpoints along the best fit curve. Instill another embodiment, the mapping can map to a plurality ofdifferent extrapolated values between two endpoints along the best fitcurve. In one embodiment, the compressed block is comprised of twopoints of the best fit curve and index values for each of the pixels. Inanother embodiment, the two points are the two endpoints.

FIG. 3 illustrates the process of compressing a decompressed block inaccordance with one embodiment of the present invention. At block 300, abest fit curve with endpoints of a pre-determined size is determined. Atblock 310, the endpoints are stored as part of a compressed block. Atblock 320, each pixel in the decompressed block is encoded as an indexinto a group of possible color values. In one embodiment, the possiblecolor values are comprised of the stored endpoints. In anotherembodiment, the possible color values are comprised of the storedendpoints and one or more interpolated values on the best fit curve. Atblock 330, the indices are stored as part of the compressed block.

In an example embodiment, the original block is a four pixel by fourpixel block wherein each pixel value is represented by 24 bits (e.g., a24-bit RGB color value). Two, 16-bit endpoints for a best fit curve arestored. Additionally, sixteen 2-bit indices (one for each pixel in theblock) are stored. The indices encode which of the two endpoint colorsor two interpolated values along the curve are the compressed color foreach pixel. The endpoints and the indices comprise a first compressedblock.

FIG. 4 illustrates the process of compressing a 24-bit per pixel, fourpixel by four pixel block in accordance with one embodiment of thepresent invention. At block 400, a best fit curve with 16-bit endpointsis determined. At block 410, the 16-bit endpoints are stored as part ofa compressed block. At block 420, each pixel in the block is encoded asa 2-bit index into a group of possible color values. The possible colorvalues are the two 16-bit endpoints and two interpolated values on thecurve. At block 430, the indices are stored as part of the compressedblock. The original block required 384 bits of storage space. Thecompressed block requires only 64 bits of storage space.

Yet Another Compression Method

In another embodiment, a compressed block is created by applying afunction to each of the values of the block to obtain new block values.In one embodiment, the function combines components of each value toreduce the amount of space needed to encode the data. In an exampleembodiment, 24-bit RGB values are combined to create an 8-bit grey scalevalue (e.g., (R+G+B)/3). In one embodiment, the new block values arecompressed by encoding the block as an index for mapping onto a best fitcurve. In one embodiment, two endpoints are stored. In anotherembodiment, the indices map to either the two points or any of one ormore interpolated values along the best fit curve. In one embodiment,the two points are end points. The two stored endpoints and the block ofindices comprise a second compressed block.

FIG. 5 illustrates the process of compressing a decompressed block inaccordance with one embodiment of the present invention. At block 500, afunction is applied to each value of the pixel block to obtain a newvalue. At block 510, a best fit curve with endpoints of a pre-determinedsize is determined using the new values. At block 520, the endpoints arestored as part of a compressed block. At block 530, each pixel in theblock is encoded as an index into a group of possible color values. Inone embodiment, the possible color values are comprised of the storedendpoints. In another embodiment, the possible color values arecomprised of the stored endpoints and one or more interpolated values onthe best fit curve. At block 540, the indices are stored as part of thecompressed block.

In an example embodiment, the original block is a four pixel by fourpixel block wherein each pixel value is represented by 24 bits (e.g., a24-bit RGB color value). The values in the block are converted to 8-bitgrey scale values. Two, 8-bit endpoints for a best fit curve are stored.Additionally, sixteen 3-bit indices (one for each pixel in the block)are stored. The indices encode which of the two endpoint colors or sixinterpolated values along the curve are the compressed color for eachpixel. The endpoints and the indices comprise a third compressed block.Further compressed blocks can be similarly obtained.

FIG. 6 illustrates the process of compressing a 24-bit per pixel, fourpixel by four pixel block in accordance with one embodiment of thepresent invention. At block 600, each 24-bit pixel value is converted toan 8-bit value by applying a function. In one embodiment, the 24-bitpixel value is an RGB value and the function applied is the average ofthe RGB values. At block 610, the new values are placed in a new pixelblock. At block 620, a best fit curve with 8-bit endpoints isdetermined. At block 630, the 8-bit endpoints are stored as part of acompressed block. At block 640, each pixel in the block is encoded as a3-bit index into a group of possible color values. The possible colorvalues are the two 8-bit endpoints and six interpolated values on thecurve. At block 650, the indices are stored as part of the compressedblock. The original block required 384 bits of storage space. Thecompressed block requires only 64 bits of storage space.

Error Reduction

In one embodiment, the error generated by compression is computed. Ifthe error is greater than a threshold value, one or more values of oneor more compressed blocks are altered to reduce the computed error.Thus, the problem of visual artifacts is reduced. FIG. 7 illustrates theprocess of reducing the occurrence of visual artifacts in accordancewith one embodiment of the present invention. At block 700, an image isdivided into a plurality of pixel blocks. At block 710, each pixel blockis decomposed into two decomposed blocks, viz. decomposed first blockand decomposed second block. At step 720, decomposed first block iscompressed using a first compression method. At block 730, decomposedsecond block is compressed using a second compression method. At block740, it is determined whether the error generated by the first andsecond compression methods is greater than a threshold value. If theerror generated is not greater than the threshold value, at block 750,the encoding is acceptable. If the error generated is greater than thethreshold value, at block 760, the values in the compressed blocks arealtered to reduce the error. It should be noted here that FIG. 7 is byway of an example that uses only two compressions of an original pixelblock, but any number of compressions are possible depending on thequality of compression desired, memory constraints of the computer, orother factors without departing from the scope of the present invention.

Alternative Color Encodings

In one embodiment, the color values are encoded as YCrCb. In oneembodiment, the Y component is encoded in one compressed block and CrCbendpoints are used to encode another compressed block. In anotherembodiment, the color values are encoded as RGB values. One of the RGBcomponents are encoded in one compressed block and endpoints in theother two components' color spaces are used to encode another compressedblock.

In one embodiment, the function associated with creation of one or morecompressed block is not a grey scale function. Instead, a vector thatrepresents the axis of the function is stored in the compressed block.In one embodiment, the vector is of unit length. In another embodiment,the vector is of non-unit length. In one embodiment, the vector is a16-bit axis vector stored in addition to the endpoints and indices aspart of the compressed block. In another embodiment, two 8-bit Theta-Phiaxis components are stored in addition to the endpoints and indices aspart of the one or more compressed blocks. The Theta-Phi axis componentsrepresent angle and elevation of the axis vector on a hemisphere. In oneembodiment, the number of bits per index is reduced to allow storage ofthe vector value without increasing the size of a compressed blockbeyond a desired maximum size. In various other embodiments, more thanone compressed blocks are encoded to represent each original block.Specific bit values have been for the purpose of example. One ofordinary skill in the art will recognize that embodiments of the presentinvention may be practiced with original pixel values of any size, usingany color encoding scheme, and generating one or more compressed blocks.

Embodiment of Computer Execution Environment (Hardware)

An embodiment of the invention can be implemented as computer softwarein the form of computer readable program code executed in a generalpurpose computing environment such as environment 800 illustrated inFIG. 8. A keyboard 810 and mouse 811 are coupled to a system bus 818.The keyboard and mouse are for introducing user input to the computersystem and communicating that user input to central processing unit(CPU) 813. Other suitable input devices may be used in addition to, orin place of, the mouse 811 and keyboard 810. I/O (input/output) unit 819coupled to bi-directional system bus 818 represents such I/O elements asa printer, A/V (audio/video) I/O, etc.

Computer 801 may include a communication interface 820 coupled to bus818. Communication interface 820 provides a two-way data communicationcoupling via a network link 821 to a local network 822. For example, ifcommunication interface 820 is an integrated services digital network(ISDN) card or a modem, communication interface 820 provides a datacommunication connection to the corresponding type of telephone line,which comprises part of network link 821. If communication interface 820is a local area network (LAN) card, communication interface 820 providesa data communication connection via network link 821 to a compatibleLAN. Wireless links are also possible. In any such implementation,communication interface 820 sends and receives electrical,electromagnetic or optical signals which carry digital data streamsrepresenting various types of information.

Network link 821 typically provides data communication through one ormore networks to other data devices. For example, network link 821 mayprovide a connection through local network 822 to local server computer823 or to data equipment operated by ISP 824. ISP 824 in turn providesdata communication services through the world wide packet datacommunication network now commonly referred to as the “Internet” 825.Local network 822 and Internet 825 both use electrical, electromagneticor optical signals which carry digital data streams. The signals throughthe various networks and the signals on network link 821 and throughcommunication interface 820, which carry the digital data to and fromcomputer 800, are exemplary forms of carrier waves transporting theinformation.

Processor 813 may reside wholly on client computer 801 or wholly onserver 826 or processor 813 may have its computational power distributedbetween computer 801 and server 826. Server 826 symbolically isrepresented in FIG. 8 as one unit, but server 826 can also bedistributed between multiple “tiers”. In one embodiment, server 826comprises a middle and back tier where application logic executes in themiddle tier and persistent data is obtained in the back tier. In thecase where processor 813 resides wholly on server 826, the results ofthe computations performed by processor 813 are transmitted to computer801 via Internet 825, Internet Service Provider (ISP) 824, local network822 and communication interface 820. In this way, computer 801 is ableto display the results of the computation to a user in the form ofoutput.

Computer 801 includes a video memory 814, main memory 815 and massstorage 812, all coupled to bi-directional system bus 818 along withkeyboard 810, mouse 811 and processor 813. As with processor 813, invarious computing environments, main memory 815 and mass storage 812,can reside wholly on server 826 or computer 801, or they may bedistributed between the two.

The mass storage 812 may include both fixed and removable media, such asmagnetic, optical or magnetic optical storage systems or any otheravailable mass storage technology. Bus 818 may contain, for example,thirty-two address lines for addressing video memory 814 or main memory815. The system bus 818 also includes, for example, a 32-bit data busfor transferring data between and among the components, such asprocessor 813, main memory 815, video memory 814 and mass storage 812.Alternatively, multiplex data/address lines may be used instead ofseparate data and address lines.

In one embodiment of the invention, the microprocessor is manufacturedby Intel, such as the 80X86 or Pentium-typed processor. However, anyother suitable microprocessor or microcomputer may be utilized. Mainmemory 815 is comprised of dynamic random access memory (DRAM). Videomemory 814 is a dual-ported video random access memory. One port of thevideo memory 814 is coupled to video amplifier 816. The video amplifier816 is used to drive the cathode ray tube (CRT) raster monitor 817.Video amplifier 816 is well known in the art and may be implemented byany suitable apparatus. This circuitry converts pixel data stored invideo memory 814 to a raster signal suitable for use by monitor 817.Monitor 817 is a type of monitor suitable for displaying graphic images.

Computer 801 can send messages and receive data, including program code,through the network(s), network link 821, and communication interface820. In the Internet example, remote server computer 826 might transmita requested code for an application program through Internet 825, ISP824, local network 822 and communication interface 820. The receivedcode may be executed by processor 813 as it is received, and/or storedin mass storage 812, or other non-volatile storage for later execution.In this manner, computer 800 may obtain application code in the form ofa carrier wave. Alternatively, remote server computer 826 may executeapplications using processor 813, and utilize mass storage 812, and/orvideo memory 815. The results of the execution at server 826 are thentransmitted through Internet 825, ISP 824, local network 822 andcommunication interface 820. In this example, computer 801 performs onlyinput and output functions.

Application code may be embodied in any form of computer programproduct. A computer program product comprises a medium configured tostore or transport computer readable code, or in which computer readablecode may be embedded. Some examples of computer program products areCD-ROM disks, ROM cards, floppy disks, magnetic tapes, computer harddrives, servers on a network, and carrier waves.

The computer systems described above are for purposes of example only.An embodiment of the invention may be implemented in any type ofcomputer system or programming or processing environment.

Thus, a method and apparatus for block based image compression withmultiple non-uniform block encodings is described in conjunction withone or more specific embodiments. The invention is defined by thefollowing claims and their full scope and equivalents.

We claim:
 1. A method adapted for use in an image compression apparatusto compress an input image comprising a plurality of pixels, the methodcomprising: partitioning, by said image compression apparatus, saidinput image into a plurality of original blocks, each comprising aselected subset of the pixels comprising said input image; decomposing,by said image compression apparatus, each of said original blocks togenerate a respective one of a plurality of decomposed blocks byapplying a function to an original value of each of said pixelscomprising each of said original blocks to obtain a decomposed valueselected to reduce the amount of space needed to encode said originalvalue; compressing, by said image compression apparatus, each of saiddecomposed blocks to generate a respective one of a plurality ofcompressed blocks; and combining, by said image compression apparatus,all of said plurality of compressed blocks to generate an output image.2. The method of claim 1 wherein compressing is further comprised of:determining a best fit curve for said decomposed values; storing two endpoint values selected on said best fit curve; and storing an index valuefor each of said pixels in said decomposed block wherein each of saidindex values comprises a respective one of a plurality of pointsselected on said best fit curve.
 3. The method of claim 1 wherein saidbest fit curve is a straight line.
 4. The method of claim 3 wherein eachof said end point values comprises 8 bits.
 5. The method of claim 4wherein each of said index values comprises a selected interpolatedvalue on said best fit curve between said end points.
 6. The method ofclaim 5 wherein each of said index values comprises 3 bits.
 7. Themethod of claim 6 wherein each of said index values comprises a vectorthat represents the axis of the function stored in the compressed block.8. The method of claim 7 wherein said vector is of unit length.
 9. Themethod of claim 3 wherein each of said index values comprises a vectorthat represents the axis of the function stored in the compressed block.10. The method of claim 9 wherein said vector is of unit length.
 11. Themethod of claim 1 wherein each of said index values comprises a selectedinterpolated value on said best fit curve between said end points. 12.The method of claim 11 wherein each of said index values comprises 3bits.
 13. The method of claim 12 wherein each of said index valuescomprises a vector that represents the axis of the function stored inthe compressed block.
 14. The method of claim 13 wherein said vector isof unit length.
 15. The method of claim 1 wherein each of said end pointvalues comprises 8 bits.
 16. The method of claim 15 wherein each of saidindex values comprises 3 bits.
 17. The method of claim 16 wherein eachof said index values comprises a vector that represents the axis of thefunction stored in the compressed block.
 18. The method of claim 17wherein said vector is of unit length.
 19. The method of claim 1 whereineach of said index values comprises 3 bits.
 20. The method of claim 1wherein each of said index values comprises a vector that represents theaxis of the function stored in the compressed block.
 21. The method ofclaim 20 wherein said vector is of unit length.
 22. A method ofgenerating an output pixel from compressed pixel data comprising:generating, by an apparatus, a first value associated with the outputpixel from a first portion of said compressed pixel data; generating, byan apparatus, a second value associated with the output pixel from asecond portion of said compressed pixel data, said second portiondifferent from said first portion; and combining, by an apparatus, saidfirst and second values to generate said output pixel.
 23. The method ofclaim 22 wherein said first value comprises color.
 24. The method ofclaim 22 wherein said combining comprises appending said second value tosaid first value.
 25. The method of claim 22 wherein said combiningcomprises averaging said first and second values.
 26. An imagecompression system operative to compress an input image comprising aplurality of pixels, the system comprising: logic operative to partitionsaid input image into a plurality of original blocks, each comprising aselected subset of the pixels comprising said input image; decomposeeach of said original blocks to generate a respective one of a pluralityof decomposed blocks by applying a function to an original value of eachof said pixels comprising each of said original blocks to obtain adecomposed value selected to reduce the amount of space needed to encodesaid original value; compress each of said decomposed blocks to generatea respective one of a plurality of compressed blocks; and combine all ofsaid plurality of compressed blocks to generate an output image.
 27. Thesystem of claim 26 wherein compressing is further comprised of:determining a best fit curve for said decomposed values; storing two endpoint values selected on said best fit curve; and storing an index valuefor each of said pixels in said decomposed block wherein each of saidindex values comprises a respective one of a plurality of pointsselected on said best fit curve.
 28. The system of claim 26 wherein saidbest fit curve is a straight line.
 29. The system of claim 28 whereineach of said end point values comprises 8 bits.
 30. The system of claim29 wherein each of said index values comprises a selected interpolatedvalue on said best fit curve between said end points.
 31. The system ofclaim 30 wherein each of said index values comprises 3 bits.
 32. Thesystem of claim 31 wherein each of said index values comprises a vectorthat represents the axis of the function stored in the compressed block.33. The system of claim 32 wherein said vector is of unit length. 34.The system of claim 28 wherein each of said index values comprises avector that represents the axis of the function stored in the compressedblock.
 35. The system of claim 34 wherein said vector is of unit length.36. The system of claim 26 wherein each of said index values comprises aselected interpolated value on said best fit curve between said endpoints.
 37. The system of claim 36 wherein each of said index valuescomprises 3 bits.
 38. The system of claim 37 wherein each of said indexvalues comprises a vector that represents the axis of the functionstored in the compressed block.
 39. The system of claim 38 wherein saidvector is of unit length.
 40. The system of claim 26 wherein each ofsaid end point values comprises 8 bits.
 41. The system of claim 40wherein each of said index values comprises 3 bits.
 42. The system ofclaim 41 wherein each of said index values comprises a vector thatrepresents the axis of the function stored in the compressed block. 43.The system of claim 42 wherein said vector is of unit length.
 44. Thesystem of claim 26 wherein each of said index values comprises 3 bits.45. The system of claim 26 wherein each of said index values comprises avector that represents the axis of the function stored in the compressedblock.
 46. The system of claim 45 wherein said vector is of unit length.47. An image compression system comprising: logic operative to compressan original image block by generating: a first portion representing afirst portion of the original image block, said first portion generatedusing a first algorithm; and a second portion representing a secondportion of the original image block, said second portion generated usinga second algorithm, said second algorithm different from said firstalgorithm.
 48. An image compression system comprising: logic operativeto generate an output pixel from compressed pixel data comprising:generating a first value associated with the output pixel from a firstportion of said compressed pixel data; generating a second valueassociated with the output pixel from a second portion of saidcompressed pixel data, said second portion different from said firstportion; and combining said first and second values to generate saidoutput pixel.
 49. The system of claim 48 wherein said first valuecomprises color.
 50. The system of claim 48 wherein said combiningcomprises appending said second value to said first value.
 51. Thesystem of claim 48 wherein said combining comprises averaging said firstand second values.